package com.gnerv.battle.boot.framework.repository.mapper;

import com.gnerv.battle.boot.framework.model.bo.LoginAccountDetailsBO;
import com.gnerv.battle.boot.framework.model.dto.ManageAccountDTO;
import com.gnerv.battle.boot.framework.model.entity.ManageAccount;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author ligen
 */
@Mapper
public interface ManageAccountMapper {

    long insert(@Param(value = "manageAccount") ManageAccount manageAccount);

    long deleteByUkId(@Param(value = "ukId") String ukId);

    long deleteBatchByUkIdList(@Param(value = "ukIdList") List<String> ukIdList);

    long updateDeletedByUkId(@Param(value = "ukId") String ukId);

    long updateByUkId(@Param(value = "manageAccount") ManageAccount manageAccount);

    ManageAccountDTO selectByUkId(@Param(value = "ukId") String ukId);

    List<ManageAccountDTO> listByUsername(@Param(value = "username") String username,
                                          @Param(value = "limitStart") Integer limitStart,
                                          @Param(value = "limitSize") Integer limitSize);

    long countByUsername(@Param(value = "username") String username);

    long isExist(@Param(value = "username") String username);

    LoginAccountDetailsBO selectAccountDetailsByUsername(@Param(value = "username") String username);
}




